//-----------------------------------------------------------
//   Custom Interaction subclass to handle right mouse-click events
//   for camera movement
//
//   Unus
//-----------------------------------------------------------
class RightMouseInteraction extends Interaction;

function Initialized()
{
   Log("Interaction initialized");
}


function bool KeyEvent( out EInputKey Key, out EInputAction Action, FLOAT Delta )
{
   local PlayerController PlayerOwner;


/*   if( Action == IST_Press && Key == IK_CapsLock)
   {
      ViewportOwner.Actor.ClientMessage("Key PRESSED:" @ Key);

   }
*/
   if( Action!=IST_Press && Action != IST_Release )
      return false;
   else if( Key != IK_RightMouse)
      return false;
   else if( Action == IST_Press )
   {
      PlayerOwner = ViewportOwner.Actor;
      //PlayerOwner.ClientMessage("Right Mouse key has been pressed.");
      EnyaraPlayerController(PlayerOwner).toggleRightMouseTrue();

      return true;
   }

   else if( Action == IST_Release )
   {
      PlayerOwner = ViewportOwner.Actor;
      //PlayerOwner.ClientMessage("Right Mouse key has been released.");
      EnyaraPlayerController(PlayerOwner).toggleRightMouseFalse();

      return true;
   }

   return false;
}

defaultproperties
{
     bVisible=True
}
